/*
 * FavourableInfo.java
 * business
 *
 * Created by ChenTao on 2016/10/27.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.bean;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.List;

/** 满赠、满减、加价购活动 */
public class FavourableInfo {

    // -------------------  活动类型 -----------------------

    /** 单商品赠品、加价购活动 */
    public static final String TYPE_GIFT = "gift";

    /** 单商品满减活动 */
    public static final String TYPE_DERATE = "derate";

    public static final String TYPE_ORDER_DERATE = "order_derate";

    // --------------------- 商品活动还是订单活动 ----------------

    public static final String BELONG_GOODS = "belong_goods";

    public static final String BELONG_ORDER = "belong_order";

    // ------------------------ 是否满足条件 ---------------------

    public static final int CAN_CHOOSE = 1;

    // ------------------------------------------------------------

    /** 活动类型 */
    @SerializedName("type")
    private String type;

    /** 活动标题 */
    @SerializedName("title")
    private String title;

    /** 活动的内容 */
    @SerializedName("content")
    private String content;

    /** 选择时活动的内容 */
    @SerializedName("select_content")
    private String selectedContent;

    /** 赠品列表 */
    @SerializedName("gift_list")
    private List<Goods> giftList;

    /** 满减活动的价格 */
    @SerializedName("discount_money")
    private float discountMoney;

    /** 当前活动的id */
    @Expose
    @SerializedName("act_id")
    private String actId;

    /** 选择的赠品id */
    @Expose
    @SerializedName("goods_id")
    private String goodsId;

    /** 当前活动所属的商品 */
    private Goods belongGoods;

    /** 当前活动所属店铺 */
    private Shop belongShop;

    /** 属于商品活动还是订单活动 */
    private String belongType;

    @SerializedName("discount_list")
    private List<Discount> discountList;

    /** 赠品活动选择的赠品 */
    private Goods chooseGift;

    /** 优惠活动最优的减免 */
    private Discount bestDiscount;

    /** 单商品满减是否满足条件 */
    @SerializedName("can_chose")
    private int canChoose;

    public int getCanChoose() {
        return canChoose;
    }

    public void setCanChoose(int canChoose) {
        this.canChoose = canChoose;
    }

    public Discount getBestDiscount() {
        return bestDiscount;
    }

    public void setBestDiscount(Discount bestDiscount) {
        this.bestDiscount = bestDiscount;
    }

    public List<Discount> getDiscountList() {
        return discountList;
    }

    public void setDiscountList(List<Discount> discountList) {
        this.discountList = discountList;
    }

    public Shop getBelongShop() {
        return belongShop;
    }

    public void setBelongShop(Shop belongShop) {
        this.belongShop = belongShop;
    }

    public String getBelongType() {
        return belongType;
    }

    public void setBelongType(String belongType) {
        this.belongType = belongType;
    }

    public Goods getBelongGoods() {
        return belongGoods;
    }

    public void setBelongGoods(Goods belongGoods) {
        this.belongGoods = belongGoods;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public String getActId() {
        return actId;
    }

    public void setActId(String actId) {
        this.actId = actId;
    }

    public float getDiscountMoney() {
        return discountMoney;
    }

    public void setDiscountMoney(float discountMoney) {
        this.discountMoney = discountMoney;
    }

    public String getSelectedContent() {
        return selectedContent;
    }

    public void setSelectedContent(String selectedContent) {
        this.selectedContent = selectedContent;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public List<Goods> getGiftList() {
        return giftList;
    }

    public void setGiftList(List<Goods> giftList) {
        this.giftList = giftList;
    }

    public Goods getChooseGift() {
        return chooseGift;
    }

    public void setChooseGift(Goods chooseGift) {
        this.chooseGift = chooseGift;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        FavourableInfo that = (FavourableInfo) o;

        return actId.equals(that.actId);
    }

    @Override
    public int hashCode() {
        return actId.hashCode();
    }
}
